#include "functions.h"





int main(int argc , char **argv) {
	commandLine test = NULL;
	test = analyseCommandLine("ls     -l & > jojo | grep caca | grep yoyo > toto");
	while(test != NULL){
		printListOfCommands(test);
		test = deleteElement(test);
		
	}

	return 0;

}


/*

//char *cmd[] = {"ls","-l",NULL};

	//execvp("ls", cmd);
	
	struct listOfCommands* macommande;
	macommande = (struct listOfCommands*) malloc(sizeof(listOfCommands));
	macommande->arg = malloc(sizeof(char*) * 3);
	macommande->arg[0] = "ls";
	macommande->arg[1] = "-l";
  	macommande->arg[2] = NULL;
	macommande->bg = FALSE;
	macommande->pipe = FALSE;
	macommande->redirect = FALSE;
	printf(" !!!!!!!!!!!!!!!!!! %s \n", macommande->arg[0]);
	execvp(macommande->arg[0], macommande->arg);


*/
